//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { CmsModels, CmsModelsResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooCmsModelsList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<CmsModelsResponse>(`/uctoo/cms_models/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooCmsModels = async (id: string) => {
  return requestClient.get<CmsModels>(`/uctoo/cms_models/${id}`);
};

export const adductooCmsModels = async (data: Partial<CmsModels>) => {
  return requestClient.post<CmsModels>('/uctoo/cms_models/add', data);
};

export const edituctooCmsModels = async (data: Partial<CmsModels>) => {
  return requestClient.post<CmsModels>('/uctoo/cms_models/edit', data);
};

export const deleteuctooCmsModels = async (id: string) => {
  return requestClient.post<any>('/uctoo/cms_models/del', { id });
};
